#ifndef __crc_H
#define __crc_H

#include <stdint.h>

#define  CRC8_CALC_EN          1
#define  CRC16_CALC_EN         0
#define  CRC32_CALC_EN         0


#if (CRC16_CALC_EN == 1)
uint16_t crc16_calc(uint8_t* data, uint16_t data_len);
#endif

#if (CRC8_CALC_EN == 1)
extern uint8_t crc8_calc(uint8_t *data, uint16_t data_len);
#endif

#if (CRC32_CALC_EN == 1)
uint32_t crc32_calc(uint8_t *buf, uint32_t size);
uint32_t crc32_sequ(uint8_t *buf, uint32_t crc, uint32_t size);
#endif

#endif
